erDiagram
    UNIT ||--o{ PERSON_ARCHIVE : "托管"
    FEE_ITEM ||--o{ PAYMENT_RECORD : "包含"
    ARCHIVE_CATEGORY ||--o{ PERSON_ARCHIVE : "分类"
    DEPOSIT_TYPE ||--o{ PERSON_ARCHIVE : "分类"
    PERSON_ARCHIVE ||--o{ PAYMENT_RECORD : "有"

    UNIT {
        INT unit_id PK "单位ID"
        VARCHAR(100) unit_name "单位名称"
        VARCHAR(50) contact_info "联系方式"
        VARCHAR(255) address "单位地址"
    }
    
    FEE_ITEM {
        INT item_id PK "项目ID"
        VARCHAR(50) item_name "项目名称"
        DECIMAL(10,2) fee_amount "收费标准"
        TEXT description "项目描述"
    }
    
    ARCHIVE_CATEGORY {
        INT category_id PK "类别ID"
        VARCHAR(50) category_name "类别名称"
    }
    
    DEPOSIT_TYPE {
        INT type_id PK "类型ID"
        VARCHAR(50) type_name "类型名称"
    }
    
    PERSON_ARCHIVE {
        VARCHAR(20) archive_id PK "档案编号"
        CHAR(18) id_number "身份证号"
        VARCHAR(50) name "姓名"
        CHAR(1) gender "性别"
        DATE birth_date "出生日期"
        VARCHAR(20) political_status "政治面貌"
        VARCHAR(20) education_level "文化程度"
        DATE deposit_date "托管日期"
        VARCHAR(10) status "状态"
        INT unit_id FK "单位ID"
        INT category_id FK "档案类别ID"
        INT type_id FK "托管类型ID"
    }
    
    PAYMENT_RECORD {
        INT payment_id PK "缴费ID"
        DATE payment_date "缴费日期"
        DECIMAL(10,2) amount "缴费金额"
        VARCHAR(50) receipt_number "收据编号"
        VARCHAR(20) archive_id FK "档案编号"
        INT item_id FK "收费项目ID"
    }